<template>
  <a-layout-footer class="footer">
    <!-- <a href="https://beian.miit.gov.cn/" style="color: rgba(0, 0, 0, 0.45)" target="_blank">
      {{ backStage.icp }}
    </a>
    <a
      :href="
        'https://www.beian.gov.cn/portal/registerSystemInfo?spm=a21t4m.27981689.1997523009.39.6ce011d9uLcqdu&recordcode=' +
        backStage.publicSecurity
      "
      style="color: rgba(0, 0, 0, 0.45); margin-left: 10px"
      target="_blank"
    >
      公安备案号: {{ backStage.publicSecurity }}
    </a> -->
  </a-layout-footer>
</template>

<script lang="ts" setup>
  import { systemAdmin } from '@/api/url'
  import { onMounted, ref } from 'vue'
  import { get } from '@/api/http'
  const backStage = ref({
    passWordError: 3, //密码输入错误次数锁定账号
    icp: '', //备案号
    publicSecurity: '', //公安备案号
    name: '', //系统名称
    backgroundCustom: false, //true开启自定义背景图片 false不开启
    backgroundImage: '', //背景图片地址
    logoImage: '', //logo地址
    pageStyle: 0,
  })
  //获取
  const systemAdminFn = () => {
    get({
      url: systemAdmin,
    }).then((res) => {
      if (res.data.name) {
        document.title = res.data.name
      }
      if (res.data.logoImage) {
        document.querySelector('link[rel="icon"]')?.setAttribute('href', res.data.logoImage)
      }

      backStage.value = res.data
    })
  }
  onMounted(async () => {
    // await systemAdminFn()
  })
</script>

<style lang="less" scoped>
  .footer {
    display: flex;
    align-items: center;
    justify-content: center;
    // height: 60px;
    color: #a9aeb8;
    text-align: center;
    // background-color: var(--color-bg-1);
    border-radius: 10px;
    margin-bottom: 90px;
  }
</style>
